package com.jackchong.widget;

import android.app.AlertDialog;
import android.content.Context;
import android.os.Bundle;

;
import com.utils.R;


public class LoadingDialog2 extends AlertDialog {


    protected boolean isAttached;
    protected boolean isDetached;


    public LoadingDialog2(Context context) {
        super(context, R.style.loadding_dialog);
    }

    public LoadingDialog2(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    public LoadingDialog2(Context context, int themeResId) {
        super(context, themeResId);
    }


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.loadding_dialog2);
//        AutoUtils.auto(this);
        setCanceledOnTouchOutside(false);
//        ((JImageView) findViewById(R.id.iv_gif)).setGif(R.drawable.gif_loadding);
    }


    public boolean isAttached() {
        return isAttached;
    }

    public void setAttached(boolean attached) {
        isAttached = attached;
    }

    public boolean isDetached() {
        return isDetached;
    }

    public void setDetached(boolean detached) {
        isDetached = detached;
    }

    @Override
    public void onAttachedToWindow() {
        super.onAttachedToWindow();
        isAttached = true;
    }

    @Override
    public void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        isDetached = true;
    }
}
